<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //setInterval(函数，间隔时间)
        // setInterval(function(){
        //     console.log('一秒执行一次')
            
        // },1000)
        function fn(){
            console.log('继续一秒一次')
        }
        // fn()
        // setInterval(fn,1000) //函数名后面不要加括号
        let n = setInterval(fn,1000)
        console.log(n)
        let m =setInterval( function fn(){
            console.log('一秒执行一次')
        },1000)
        console.log(m)
        clearInterval(n)
    </script>
</body>
</html>